﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ComForm.Auxiliary
{
    public partial class FormRetryTip : Form
    {
        public FormRetryTip()
        {
            InitializeComponent();
        }

        private int _nHoldTime = 0;
        private int _nRestTime = 0;

        public void SetTimes(int c, int r)
        {
            _nHoldTime = c;
            _nRestTime = r;
        }

        private void FormRetryTip_Load(object sender, EventArgs e)
        {
            if (_nRestTime == 0)
            {
                label1.Visible = false;
                label2.Visible = false;
                label3.Visible = false;
                label4.Visible = false;
                labelCurrentT.Visible = false;
                labelRestT.Visible = false;
                labelLastRetryTip.Visible = true;
            }
            else
            {
                label1.Visible = true;
                label2.Visible = true;
                label3.Visible = true;
                label4.Visible = true;
                labelCurrentT.Visible = true;
                labelRestT.Visible = true;
                labelLastRetryTip.Visible = false;
                labelCurrentT.Text = _nHoldTime.ToString();
                labelRestT.Text = _nRestTime.ToString();
            }
        }

        private void buttonOK_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
